import ShowRoute from '@/components/routes'

const views = [{
    path: '/routes',
    name: 'routes',
    component: ShowRoute,
    meta: {
        name: '路由查看页',
    }
}];
import error404 from '@/components/error/404'
const error = [{
    path: '*',
    name: '404',
    component: error404,
    meta: {
        name: '404',
    }
}, {
    path: '/',
    name: '重定向',
    redirect: '/home',
    // component: error404,
    meta: {
        name: '魔方首页',
        tabbars: 0
    }
}]
import home from '@/components/home/index'
const homes = [{
        path: '/home',
        name: 'home',
        component: home,
        meta: {
            name: '魔方首页',
            tabbars: 0
        }
    }]
    /**
     * 个人中心
     * user
     */
    /**
     * 个人中心
     * userindex 个人中心
     * personal 个人资料
     * edituser 修改个人资料
     * password 密码设置（交易/登录）
     * forget 忘记密码（交易/登录）
     * setpass 设置密码（交易/登录）
     * payment 支付绑定
     * paymentedit 添加绑定
     * paymentdetail 绑定详情
     */
import userindex from '@/components/user/index'
import personal from '@/components/user/personal/index'
import edituser from '@/components/user/personal/edituser'
import password from '@/components/user/password'
import forget from '@/components/user/password/forget'
import setpass from '@/components/user/password/setpass'
import payment from '@/components/user/payment'
import paymentedit from '@/components/user/payment/edit'
import paymentdetail from '@/components/user/payment/payments'
import login from '@/components/user/login'
import register from '@/components/user/register';
import protocol from '@/components/user/protocol';

const user = [{
        path: '/user',
        name: 'users',
        component: userindex,
        meta: {
            name: '我的',
            tabbars: 3
        }
    },
    {
        path: '/user/personal',
        name: 'personal',
        component: personal,
        meta: {
            name: '个人资料',
        }
    },
    {
        path: '/user/edituser',
        name: 'edituser',
        component: edituser,
        meta: {
            name: '修改资料',
        }
    },
    {
        path: '/user/password',
        name: 'password',
        component: password,
        meta: {
            name: '设置密码',
        }
    },
    {
        path: '/user/forget',
        name: 'forget',
        component: forget,
        meta: {
            name: '登录密码',
        }
    },
    {
        path: '/user/setpass',
        name: 'setpass',
        component: setpass,
        meta: {
            name: '忘记密码',
        }
    },
    {
        path: '/user/payment',
        name: 'payment',
        component: payment,
        meta: {
            name: '支付绑定',
        }
    },
    {
        path: '/user/paymentedit',
        name: 'paymentedit',
        component: paymentedit,
        meta: {
            name: '支付绑定',
        }
    },
    {
        path: '/user/paymentdetail',
        name: 'paymentdetail',
        component: paymentdetail,
        meta: {
            name: '支付绑定',
        }
    }, {
        path: '/user/login',
        name: 'login',
        component: login,
        meta: {
            name: '登录',
        }
    },
    {
        path: '/user/register',
        name: 'register',
        component: register,
        meta: {
            name: '注册',
        }
    },
    {
        path: '/user/protocol',
        name: 'protocol',
        component: protocol,
        meta: {
            name: '用户协议',
        }
    },
];

/**
 * Trading 交易大厅
 * trading 首页
 * tradhang 挂卖 挂买
 *  tradsell 买入 卖出
 */
import trading from '@/components/tradings'
import tradhang from '@/components/tradings/tradHang'
import tradsell from '@/components/tradings/tradSell'

const tradings = [{
    path: '/trading',
    name: 'trading',
    component: trading,
    meta: {
        name: '交易大厅',
        tabbars: 1
    }
}, {
    path: '/trading/tradhang',
    name: 'tradhang',
    component: tradhang,
    meta: {
        name: '交易大厅'
    }
}, {
    path: '/trading/tradsell',
    name: 'tradsell',
    component: tradsell,
    meta: {
        name: '交易大厅',
    }
}]

import NewsList from '@/components/news/list'
import NewsDetail from '@/components/news/detail'

const news = [{
        path: '/news/list',
        name: 'list',
        component: NewsList,
        meta: {
            name: '最新资讯',
        }
    },
    {
        path: '/news/detail',
        name: 'detail',
        component: NewsDetail,
        meta: {
            name: '资讯详情',
        }
    }
];

import GuideIndex from '@/components/guide/index';
import GuideDetail from '@/components/guide/detail';

const guide = [{
        path: '/guide/index',
        name: 'GuideIndex',
        component: GuideIndex,
        meta: {
            name: '新手指南',
        }
    },
    {
        path: '/guide/detail',
        name: 'details',
        component: GuideDetail,
        meta: {
            name: '新手指南-问题详情',
        }
    },
]

import OrderIndex from '@/components/order/index';
import HangDetail from '@/components/order/HangDetail';
import appeal from '@/components/order/appeal';
import appealdetail from '@/components/order/appealDetail';
import orderBankCard from '@/components/order/bankCard';
import orderDetail from '@/components/order/orderDetail';
import makeplan from '@/components/order/makeplan'
const order = [{
        path: '/order/index',
        name: 'OrderIndex',
        component: OrderIndex,
        meta: {
            name: '我的订单',
        }
    },
    {
        path: '/order/HangDetail',
        name: 'HangDetail',
        component: HangDetail,
        meta: {
            name: '挂买详情',
        }
    },
    {
        path: '/order/orderDetail',
        name: 'orderDetail',
        component: orderDetail,
        meta: {
            name: '订单详情',
        }
    },
    {
        path: '/order/appeal',
        name: 'appeal',
        component: appeal,
        meta: {
            name: '我要申诉',
        }
    },
    {
        path: '/order/appealdetail',
        name: 'appealdetail',
        component: appealdetail,
        meta: {
            name: '我要申诉',
        }
    },
    {
        path: '/order/bankCard',
        name: 'bankCard',
        component: orderBankCard,
        meta: {
            name: '银行卡',
        }
    },
    {
        path: '/order/makeplan',
        name: 'makeplan',
        component: makeplan,
        meta: {
            name: '打款截图',
        }
    },
];

// 分享
import ShareIndex from '@/components/share/index';

const share = [{
    path: '/share/index',
    name: 'ShareIndex',
    component: ShareIndex,
    meta: {
        name: '推荐分享',
    }
}, ];
// 我的资产
import propertyIndex from '@/components/property/index'
import transfer from '@/components/property/transfer'
import rollOut from '@/components/property/rollOut'
import out from '@/components/property/out'
import ding from '@/components/property/ding'
const property = [{
        path: '/property/index',
        name: 'propertyIndex',
        component: propertyIndex,
        meta: {
            name: '我的资产',
        }
    },
    {
        path: '/property/transfer',
        name: 'transfer',
        component: transfer,
        meta: {
            name: '资产转账',
        }
    },
    {
        path: '/property/rollOut',
        name: 'rollOut',
        component: rollOut,
        meta: {
            name: '转出',
        }
    },
    {
        path: '/property/out',
        name: 'out',
        component: out,
        meta: {
            name: '转出',
        }
    }, {
        path: '/property/ding',
        name: 'ding',
        component: ding,
        meta: {
            name: '签到记录',
        }
    }
];


import GameIndex from '@/components/game/index'
import GameOrder from '@/components/game/order'
import GameRecord from '@/components/game/record'
import GameRule from '@/components/game/rule'
import point from '@/components/game/point'

const game = [{
        path: '/game/index',
        name: 'GameIndex',
        component: GameIndex,
        meta: {
            name: '魔方财富',
            tabbars: 2
        }
    },
    {
        path: '/game/order',
        name: 'order',
        component: GameOrder,
        meta: {
            name: '我的矿点',
        }
    },
    {
        path: '/game/record',
        name: 'record',
        component: GameRecord,
        meta: {
            name: '记录',
        }
    },
    {
        path: '/game/rule',
        name: 'rule',
        component: GameRule,
        meta: {
            name: '游戏规则 ',
        }
    },
    {
        path: '/game/point',
        name: 'point',
        component: point,
        meta: {
            name: '点位详情',
        }
    },
];

import TeamIndex from '@/components/team/index'
import teamer from "@/components/team/teamer";
const team = [{
    path: '/team/index',
    name: 'index',
    component: TeamIndex,
    meta: {
        name: '我的好友'
    }
}, {
    path: '/teamer/index',
    name: 'teamer',
    component: teamer,
    meta: {
        name: '节点收益记录'
    }
}];

// 暂无相关记录
// import myorder from '@/components/record/order'
// import myteam from '@/components/record/team'
// import myrecord from '@/components/record/record'
// import position from '@/components/record/position'
// import noproperty from '@/components/record/property'

export const routes = [...error, ...homes, ...tradings, ...user, ...news, ...guide, ...views, ...order, ...share, ...property, ...game, ...team];